I’ve been pretty preoccupied with thoughts about the semantic web and how to utilize the possibilities of it recently. My problems with the various protocols, XML formats and microformats have been the lack of consuming services. In other words; it has been relatively painless to construct websites in a semantic way using microformats etc. but no cool services or applications have utilized it. In that regard it has felt much like just an idea with no real purpose.

So I have been challenging my self to come up with ideas to utilize the semantic web – a way to consume some of this data in a way that makes sense. One of the formats I have been paying attention to is APML (Attention Profiling Markup Language).

APML explained

To put it very simple, APML is an XML file that holds information about a person’s interests and ranks them relative to each other. It looks like this:

<Concepts>
  <Concept key=”Gardening” value=”0.75”>
  <Concept key=”Programming” value=”1”>
  <Concept key=”Motorcycles” value=”0.6”>
  <Concept key=”Reading” value=”0.4”>
  <Concept key=”Diving” value=”0.2”>
</Concepts>

The key attribute is the interest and the value represents the relative rank of the individual interests from 0 to 1 where 1 is of the highest interest. Here is my APML file auto generated from tags and categories on this blog. Emily Chang wrote a post about APML with some good examples of its uses.

Filter content

You probably subscribe to some blogs by RSS and some of those blog authors sometimes write posts that aren’t of your interest. Still they end up in your RSS reader. Wouldn’t it be cool if you could utilize your APML file to filter that content so you only got the posts that matches your interests? I would think so.

I’ve just implemented APML support on this blog for both the RSS and ATOM feeds, but also for the search page. If you specify a URL to an APML file as a query string to the RSS feed, you’ll get an RSS feed back that is filtered to match your interests.

Check out the RSS feed or the search result both filtered using the same APML file. The APML file used belongs to John Dyer, the maker of FreeTextBox and also the guy that pointed me to APML in the first place.

APML filtering will be fully supported in the next version of BlogEngine.NET as well.

A few weeks back, Google released their Social Graph API – a JSON service that gives you access to Google’s information about your online presence. A C# wrapper is available for download at the bottom. 

How it works

This video explains it better then I can:

Try it yourself

For some strange reason, Google has only made the API available in JSON and that sucks if you want to use it from anything else than JavaScript. Since I wanted to use it from C# I built a small wrapper class that exposes all the features from the very simple API. You can try it yourself from the demo social graph page I wrote using the wrapper class. Just enter your blog URL in the input box.

Download

The wrapper is just a single small class that you can dump into your App_Code folder and you are ready to go. The demo web page is also included in the download so you can see how to use it. It’s just a single .aspx page.

socialgraph.zip (3.80 kb)